﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gqq.Csharpindepth.Designpatter
{
    /// <summary>
    /// 生成器模式
    /// 做一件事，需要的步骤大概是确定的，需要各部分去做
    /// </summary>
    public abstract class BuildHotelClass
    {
        //地基

        public abstract void BuildDiji();

        //围墙
        public abstract void BuildWall();

        //天花板
        public abstract void BuildTianhuaban();

        //装修
        public abstract void BuildZhuangxiu();
    }

    /// <summary>
    /// 关启强建立的类别
    /// </summary>
    public class GqqBuildClass:BuildHotelClass
    {
        public override void BuildDiji()
        {
            Console.WriteLine("gqq建立地基");
        }

        public override void BuildWall()
        {
            Console.WriteLine("gqq建立墙壁");
        }

        public override void BuildTianhuaban()
        {
            Console.WriteLine("gqq建立天花板");
        }

        public override void BuildZhuangxiu()
        {
            Console.WriteLine("gqq建立装修u");
        }
    }

    /// <summary>
    /// 其他人建立的类别
    /// </summary>
    public class QitaBuildClass : BuildHotelClass
    {

        public override void BuildDiji()
        {
            Console.WriteLine("qita建立地基");
        }

        public override void BuildWall()
        {
            Console.WriteLine("qita建立墙壁");
        }

        public override void BuildTianhuaban()
        {
            Console.WriteLine("qita建立天花板");
        }

        public override void BuildZhuangxiu()
        {
            Console.WriteLine("qita建立装修u");
        }
    }

}
